<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsZhurnalObrasch" targetNamespace="http://tempuri.org/DataSet1.xsd" xmlns:mstns="http://tempuri.org/DataSet1.xsd" xmlns="http://tempuri.org/DataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="p301ConnString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="p301ConnString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.p301.Properties.Settings.GlobalReference.Default.p301ConnString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="taZhurnalObrasch" GeneratorDataComponentClassName="taZhurnalObrasch" Name="dtZhurnalObrasch" UserDataComponentName="taZhurnalObrasch">
            <MainSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM b_zhurnal_obrasch
WHERE     (K_ZHURNAL_OBRASCH = @Original_K_ZHURNAL_OBRASCH)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="Original_K_ZHURNAL_OBRASCH" ColumnName="K_ZHURNAL_OBRASCH" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_K_ZHURNAL_OBRASCH" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_ZHURNAL_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
                    <CommandText>InsertZhurnalObrasch</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_ZHURNAL_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@D_OBRASCH" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="D_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@V_OBRASCH" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="V_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@K_RAB" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_RAB" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@D_KONS" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="D_KONS" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@V_KONS" Precision="23" ProviderType="DateTime" Scale="3" Size="8" SourceColumn="V_KONS" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@F_PROVEDENA" Precision="1" ProviderType="Bit" Scale="0" Size="1" SourceColumn="F_PROVEDENA" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@K_PRIZN" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_PRIZN" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@K_KPO" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_KPO" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@K_OBRASCH" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@K_RAB_ZAPOL" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_RAB_ZAPOL" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@N_FA" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_FA" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@N_IM" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_IM" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@N_OT" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_OT" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@C_NPP" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="C_NPP" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@K_ZHURNAL_OBRASCH" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_ZHURNAL_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT        CASE b_kpo.F_KRIZIS WHEN 1 THEN 'K' WHEN 0 THEN ' ' END AS KR, b_zhurnal_obrasch.F_PROVEDENA, CASE isnull(s_obrasch.N_OBRASCH, '') 
                         WHEN '' THEN 'нет' ELSE UPPER(SUBSTRING(s_obrasch.N_OBRASCH, CHARINDEX(' ', s_obrasch.N_OBRASCH) + 1, 1)) 
                         + CASE b_kpo.F_KRIZIS WHEN 1 THEN '(K)' ELSE '' END END AS N_OBRASCH_T, b_zhurnal_obrasch.K_ZHURNAL_OBRASCH, b_zhurnal_obrasch.K_RAB_ZAPOL, 
                         b_zhurnal_obrasch.K_OBRASCH, b_zhurnal_obrasch.C_NPP, DATEADD(DAY, 0, DATEDIFF(DAY, 0, b_zhurnal_obrasch.D_OBRASCH)) AS D_OBRASCH, 
                         CAST(dbo.GetTime(b_zhurnal_obrasch.V_OBRASCH) AS datetime) AS V_OBRASCH, b_zhurnal_obrasch.N_FA, b_zhurnal_obrasch.N_IM, b_zhurnal_obrasch.N_OT, 
                         b_zhurnal_obrasch.D_KONS, CAST(dbo.GetTime(b_zhurnal_obrasch.V_KONS) AS datetime) AS V_KONS, b_zhurnal_obrasch.K_RAB, b_zhurnal_obrasch.K_PRIZN, 
                         b_kpo.NPP_KPO, b_uks.NPP_UKS, b_zhurnal_obrasch.K_KPO, b_kpo.K_UKS, dbo.CompressFio(s_rab_zapoln.N_RAB) AS N_RAB_ZAPOL, s_zurnal_prizn.N_PRIZN, 
                         dbo.CompressFio(s_rab.N_RAB) AS N_RAB
FROM            b_zhurnal_obrasch LEFT OUTER JOIN
                         s_obrasch ON b_zhurnal_obrasch.K_OBRASCH = s_obrasch.K_OBRASCH LEFT OUTER JOIN
                         s_zurnal_prizn ON b_zhurnal_obrasch.K_PRIZN = s_zurnal_prizn.K_PRIZN LEFT OUTER JOIN
                         s_rab ON b_zhurnal_obrasch.K_RAB = s_rab.K_RAB LEFT OUTER JOIN
                         s_rab AS s_rab_zapoln ON b_zhurnal_obrasch.K_RAB_ZAPOL = s_rab_zapoln.K_RAB LEFT OUTER JOIN
                         b_kpo ON b_kpo.K_KPO = b_zhurnal_obrasch.K_KPO LEFT OUTER JOIN
                         b_uks ON b_uks.K_UKS = b_kpo.K_UKS
WHERE        (YEAR(b_zhurnal_obrasch.D_OBRASCH) = @pYear)
ORDER BY MONTH(b_zhurnal_obrasch.D_OBRASCH), DAY(b_zhurnal_obrasch.D_OBRASCH), b_zhurnal_obrasch.C_NPP</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="pYear" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="Decimal" Direction="Input" ParameterName="@pYear" Precision="0" Scale="0" Size="0" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE    b_zhurnal_obrasch
SET              C_NPP = @C_NPP, D_OBRASCH = @D_OBRASCH, V_OBRASCH = @V_OBRASCH, K_RAB = @K_RAB, D_KONS = @D_KONS, V_KONS = @V_KONS, 
                      F_PROVEDENA = @F_PROVEDENA, K_PRIZN = @K_PRIZN, K_KPO = @K_KPO, K_OBRASCH = @K_OBRASCH, K_RAB_ZAPOL = @K_RAB_ZAPOL, 
                      N_FA = @N_FA, N_IM = @N_IM, N_OT = @N_OT
WHERE     (K_ZHURNAL_OBRASCH = @Original_K_ZHURNAL_OBRASCH)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="C_NPP" ColumnName="C_NPP" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@C_NPP" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="C_NPP" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="D_OBRASCH" ColumnName="D_OBRASCH" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@D_OBRASCH" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="D_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="V_OBRASCH" ColumnName="V_OBRASCH" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@V_OBRASCH" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="V_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="K_RAB" ColumnName="K_RAB" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K_RAB" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_RAB" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="D_KONS" ColumnName="D_KONS" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@D_KONS" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="D_KONS" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="V_KONS" ColumnName="V_KONS" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@V_KONS" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="V_KONS" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="F_PROVEDENA" ColumnName="F_PROVEDENA" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@F_PROVEDENA" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="F_PROVEDENA" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="K_PRIZN" ColumnName="K_PRIZN" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K_PRIZN" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_PRIZN" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="K_KPO" ColumnName="K_KPO" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K_KPO" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_KPO" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="K_OBRASCH" ColumnName="K_OBRASCH" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K_OBRASCH" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="K_RAB_ZAPOL" ColumnName="K_RAB_ZAPOL" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@K_RAB_ZAPOL" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_RAB_ZAPOL" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="N_FA" ColumnName="N_FA" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@N_FA" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_FA" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="N_IM" ColumnName="N_IM" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@N_IM" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_IM" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="N_OT" ColumnName="N_OT" DataSourceName="" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@N_OT" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="N_OT" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="Original_K_ZHURNAL_OBRASCH" ColumnName="K_ZHURNAL_OBRASCH" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_K_ZHURNAL_OBRASCH" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_ZHURNAL_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="KR" DataSetColumn="KR" />
              <Mapping SourceColumn="F_PROVEDENA" DataSetColumn="F_PROVEDENA" />
              <Mapping SourceColumn="K_ZHURNAL_OBRASCH" DataSetColumn="K_ZHURNAL_OBRASCH" />
              <Mapping SourceColumn="K_RAB_ZAPOL" DataSetColumn="K_RAB_ZAPOL" />
              <Mapping SourceColumn="K_OBRASCH" DataSetColumn="K_OBRASCH" />
              <Mapping SourceColumn="C_NPP" DataSetColumn="C_NPP" />
              <Mapping SourceColumn="D_OBRASCH" DataSetColumn="D_OBRASCH" />
              <Mapping SourceColumn="V_OBRASCH" DataSetColumn="V_OBRASCH" />
              <Mapping SourceColumn="N_FA" DataSetColumn="N_FA" />
              <Mapping SourceColumn="N_IM" DataSetColumn="N_IM" />
              <Mapping SourceColumn="N_OT" DataSetColumn="N_OT" />
              <Mapping SourceColumn="D_KONS" DataSetColumn="D_KONS" />
              <Mapping SourceColumn="V_KONS" DataSetColumn="V_KONS" />
              <Mapping SourceColumn="K_RAB" DataSetColumn="K_RAB" />
              <Mapping SourceColumn="K_PRIZN" DataSetColumn="K_PRIZN" />
              <Mapping SourceColumn="NPP_KPO" DataSetColumn="NPP_KPO" />
              <Mapping SourceColumn="K_KPO" DataSetColumn="K_KPO" />
              <Mapping SourceColumn="K_UKS" DataSetColumn="K_UKS" />
              <Mapping SourceColumn="NPP_UKS" DataSetColumn="NPP_UKS" />
              <Mapping SourceColumn="N_RAB_ZAPOL" DataSetColumn="N_RAB_ZAPOL" />
              <Mapping SourceColumn="N_PRIZN" DataSetColumn="N_PRIZN" />
              <Mapping SourceColumn="N_RAB" DataSetColumn="N_RAB" />
              <Mapping SourceColumn="N_OBRASCH_T" DataSetColumn="N_OBRASCH_T" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillAll" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorGetMethodName="GetDataBy" GeneratorSourceName="FillAll" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="FillAll">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     TOP (@pTOP) CASE b_kpo.F_KRIZIS WHEN 1 THEN 'K' WHEN 0 THEN ' ' END AS KR, b_zhurnal_obrasch.F_PROVEDENA, 
                      CASE isnull(s_obrasch.N_OBRASCH, '') WHEN '' THEN 'нет' ELSE UPPER(SUBSTRING(s_obrasch.N_OBRASCH, CHARINDEX(' ', 
                      s_obrasch.N_OBRASCH) + 1, 1)) + CASE b_kpo.F_KRIZIS WHEN 1 THEN '(K)' ELSE '' END END AS N_OBRASCH_T, 
                      b_zhurnal_obrasch.K_ZHURNAL_OBRASCH, b_zhurnal_obrasch.K_RAB_ZAPOL, b_zhurnal_obrasch.K_OBRASCH, b_zhurnal_obrasch.C_NPP, 
                      b_zhurnal_obrasch.D_OBRASCH, b_zhurnal_obrasch.V_OBRASCH, b_zhurnal_obrasch.N_FA, b_zhurnal_obrasch.N_IM, b_zhurnal_obrasch.N_OT, 
                      b_zhurnal_obrasch.D_KONS, b_zhurnal_obrasch.V_KONS, b_zhurnal_obrasch.K_RAB, b_zhurnal_obrasch.K_PRIZN, b_kpo.NPP_KPO, 
                      b_uks.NPP_UKS, b_zhurnal_obrasch.K_KPO, b_kpo.K_UKS, dbo.CompressFio(s_rab_zapoln.N_RAB) AS N_RAB_ZAPOL, s_zurnal_prizn.N_PRIZN, 
                      dbo.CompressFio(s_rab.N_RAB) AS N_RAB
FROM         b_zhurnal_obrasch LEFT OUTER JOIN
                      s_obrasch ON b_zhurnal_obrasch.K_OBRASCH = s_obrasch.K_OBRASCH LEFT OUTER JOIN
                      s_zurnal_prizn ON b_zhurnal_obrasch.K_PRIZN = s_zurnal_prizn.K_PRIZN LEFT OUTER JOIN
                      s_rab ON b_zhurnal_obrasch.K_RAB = s_rab.K_RAB LEFT OUTER JOIN
                      s_rab AS s_rab_zapoln ON b_zhurnal_obrasch.K_RAB_ZAPOL = s_rab_zapoln.K_RAB LEFT OUTER JOIN
                      b_kpo ON b_kpo.K_KPO = b_zhurnal_obrasch.K_KPO LEFT OUTER JOIN
                      b_uks ON b_uks.K_UKS = b_kpo.K_UKS
ORDER BY MONTH(b_zhurnal_obrasch.D_OBRASCH), DAY(b_zhurnal_obrasch.D_OBRASCH), b_zhurnal_obrasch.C_NPP</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="pTOP" ColumnName="" DataSourceName="" DataTypeServer="unknown" DbType="Int32" Direction="Input" ParameterName="@pTOP" Precision="0" Scale="0" Size="0" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="FillOneRecord" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorSourceName="FillOneRecord" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="FillOneRecord">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT     CASE b_kpo.F_KRIZIS WHEN 1 THEN 'K' WHEN 0 THEN '' END AS KR, b_zhurnal_obrasch.F_PROVEDENA, 
                      b_zhurnal_obrasch.K_ZHURNAL_OBRASCH, b_zhurnal_obrasch.K_RAB_ZAPOL, b_zhurnal_obrasch.K_OBRASCH, b_zhurnal_obrasch.C_NPP, 
                      b_zhurnal_obrasch.D_OBRASCH, b_zhurnal_obrasch.V_OBRASCH, b_zhurnal_obrasch.N_FA, b_zhurnal_obrasch.N_IM, b_zhurnal_obrasch.N_OT, 
                      b_zhurnal_obrasch.D_KONS, b_zhurnal_obrasch.V_KONS, b_zhurnal_obrasch.K_RAB, b_zhurnal_obrasch.K_PRIZN, b_kpo.NPP_KPO, 
                      b_uks.NPP_UKS, b_zhurnal_obrasch.K_KPO, b_kpo.K_UKS
FROM         b_zhurnal_obrasch LEFT OUTER JOIN
                      b_kpo ON b_kpo.K_KPO = b_zhurnal_obrasch.K_KPO LEFT OUTER JOIN
                      b_uks ON b_uks.K_UKS = b_kpo.K_UKS
WHERE     (b_zhurnal_obrasch.K_ZHURNAL_OBRASCH = @pK_ZHURNAL_OBRASCH)
ORDER BY MONTH(b_zhurnal_obrasch.D_OBRASCH), DAY(b_zhurnal_obrasch.D_OBRASCH), b_zhurnal_obrasch.C_NPP</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="pK_ZHURNAL_OBRASCH" ColumnName="K_ZHURNAL_OBRASCH" DataSourceName="p301.dbo.b_zhurnal_obrasch" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@pK_ZHURNAL_OBRASCH" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="K_ZHURNAL_OBRASCH" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="taYear" GeneratorDataComponentClassName="taYear" Name="dtYear" UserDataComponentName="taYear">
            <MainSource>
              <DbSource ConnectionRef="p301ConnString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT  Year(D_OBRASCH) As C_YEAR 
FROM b_zhurnal_obrasch 
WHERE not D_OBRASCH is null
GROUP BY Year(D_OBRASCH) 
ORDER BY Year(b_zhurnal_obrasch.D_OBRASCH) DESC</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="C_YEAR" DataSetColumn="C_YEAR" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsZhurnalObrasch" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="dsZhurnalObrasch" msprop:Generator_DataSetName="dsZhurnalObrasch">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dtZhurnalObrasch" msdata:CaseSensitive="False" msprop:Generator_UserTableName="dtZhurnalObrasch" msprop:Generator_RowDeletedName="dtZhurnalObraschRowDeleted" msprop:Generator_RowChangedName="dtZhurnalObraschRowChanged" msprop:Generator_RowClassName="dtZhurnalObraschRow" msprop:Generator_RowChangingName="dtZhurnalObraschRowChanging" msprop:Generator_RowEvArgName="dtZhurnalObraschRowChangeEvent" msprop:Generator_RowEvHandlerName="dtZhurnalObraschRowChangeEventHandler" msprop:Generator_TableClassName="dtZhurnalObraschDataTable" msprop:Generator_TableVarName="tabledtZhurnalObrasch" msprop:Generator_RowDeletingName="dtZhurnalObraschRowDeleting" msprop:Generator_TablePropName="dtZhurnalObrasch">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="KR" msdata:ReadOnly="true" msprop:Generator_UserColumnName="KR" msprop:Generator_ColumnPropNameInRow="KR" msprop:Generator_ColumnVarNameInTable="columnKR" msprop:Generator_ColumnPropNameInTable="KRColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="F_PROVEDENA" msprop:Generator_UserColumnName="F_PROVEDENA" msprop:Generator_ColumnPropNameInRow="F_PROVEDENA" msprop:Generator_ColumnVarNameInTable="columnF_PROVEDENA" msprop:Generator_ColumnPropNameInTable="F_PROVEDENAColumn" type="xs:boolean" default="false" />
              <xs:element name="K_ZHURNAL_OBRASCH" msprop:Generator_UserColumnName="K_ZHURNAL_OBRASCH" msprop:Generator_ColumnPropNameInRow="K_ZHURNAL_OBRASCH" msprop:Generator_ColumnVarNameInTable="columnK_ZHURNAL_OBRASCH" msprop:Generator_ColumnPropNameInTable="K_ZHURNAL_OBRASCHColumn" type="xs:int" default="0" />
              <xs:element name="K_RAB_ZAPOL" msprop:Generator_UserColumnName="K_RAB_ZAPOL" msprop:Generator_ColumnPropNameInRow="K_RAB_ZAPOL" msprop:Generator_ColumnVarNameInTable="columnK_RAB_ZAPOL" msprop:Generator_ColumnPropNameInTable="K_RAB_ZAPOLColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_OBRASCH" msprop:Generator_UserColumnName="K_OBRASCH" msprop:Generator_ColumnPropNameInRow="K_OBRASCH" msprop:Generator_ColumnVarNameInTable="columnK_OBRASCH" msprop:Generator_ColumnPropNameInTable="K_OBRASCHColumn" type="xs:int" minOccurs="0" />
              <xs:element name="C_NPP" msprop:Generator_UserColumnName="C_NPP" msprop:Generator_ColumnPropNameInRow="C_NPP" msprop:Generator_ColumnVarNameInTable="columnC_NPP" msprop:Generator_ColumnPropNameInTable="C_NPPColumn" type="xs:int" minOccurs="0" />
              <xs:element name="D_OBRASCH" msprop:Generator_UserColumnName="D_OBRASCH" msprop:Generator_ColumnPropNameInRow="D_OBRASCH" msprop:Generator_ColumnVarNameInTable="columnD_OBRASCH" msprop:Generator_ColumnPropNameInTable="D_OBRASCHColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="V_OBRASCH" msprop:Generator_UserColumnName="V_OBRASCH" msprop:Generator_ColumnPropNameInRow="V_OBRASCH" msprop:Generator_ColumnVarNameInTable="columnV_OBRASCH" msprop:Generator_ColumnPropNameInTable="V_OBRASCHColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="N_FA" msprop:Generator_UserColumnName="N_FA" msprop:Generator_ColumnPropNameInRow="N_FA" msprop:Generator_ColumnVarNameInTable="columnN_FA" msprop:Generator_ColumnPropNameInTable="N_FAColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N_IM" msprop:Generator_UserColumnName="N_IM" msprop:Generator_ColumnPropNameInRow="N_IM" msprop:Generator_ColumnVarNameInTable="columnN_IM" msprop:Generator_ColumnPropNameInTable="N_IMColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N_OT" msprop:Generator_UserColumnName="N_OT" msprop:Generator_ColumnPropNameInRow="N_OT" msprop:Generator_ColumnVarNameInTable="columnN_OT" msprop:Generator_ColumnPropNameInTable="N_OTColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="D_KONS" msprop:Generator_UserColumnName="D_KONS" msprop:Generator_ColumnPropNameInRow="D_KONS" msprop:Generator_ColumnVarNameInTable="columnD_KONS" msprop:Generator_ColumnPropNameInTable="D_KONSColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="V_KONS" msprop:Generator_UserColumnName="V_KONS" msprop:Generator_ColumnPropNameInRow="V_KONS" msprop:Generator_ColumnVarNameInTable="columnV_KONS" msprop:Generator_ColumnPropNameInTable="V_KONSColumn" type="xs:dateTime" minOccurs="0" />
              <xs:element name="K_RAB" msprop:Generator_UserColumnName="K_RAB" msprop:Generator_ColumnPropNameInRow="K_RAB" msprop:Generator_ColumnVarNameInTable="columnK_RAB" msprop:Generator_ColumnPropNameInTable="K_RABColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_PRIZN" msprop:Generator_UserColumnName="K_PRIZN" msprop:Generator_ColumnPropNameInRow="K_PRIZN" msprop:Generator_ColumnVarNameInTable="columnK_PRIZN" msprop:Generator_ColumnPropNameInTable="K_PRIZNColumn" type="xs:int" minOccurs="0" />
              <xs:element name="NPP_KPO" msprop:Generator_UserColumnName="NPP_KPO" msprop:Generator_ColumnPropNameInRow="NPP_KPO" msprop:Generator_ColumnVarNameInTable="columnNPP_KPO" msprop:Generator_ColumnPropNameInTable="NPP_KPOColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_KPO" msdata:ReadOnly="true" msprop:Generator_UserColumnName="K_KPO" msprop:Generator_ColumnPropNameInRow="K_KPO" msprop:Generator_ColumnVarNameInTable="columnK_KPO" msprop:Generator_ColumnPropNameInTable="K_KPOColumn" type="xs:int" minOccurs="0" />
              <xs:element name="K_UKS" msdata:ReadOnly="true" msprop:Generator_UserColumnName="K_UKS" msprop:Generator_ColumnPropNameInRow="K_UKS" msprop:Generator_ColumnVarNameInTable="columnK_UKS" msprop:Generator_ColumnPropNameInTable="K_UKSColumn" type="xs:int" minOccurs="0" />
              <xs:element name="NPP_UKS" msprop:Generator_UserColumnName="NPP_UKS" msprop:Generator_ColumnPropNameInRow="NPP_UKS" msprop:Generator_ColumnVarNameInTable="columnNPP_UKS" msprop:Generator_ColumnPropNameInTable="NPP_UKSColumn" type="xs:int" minOccurs="0" />
              <xs:element name="N_RAB_ZAPOL" msdata:ReadOnly="true" msprop:Generator_UserColumnName="N_RAB_ZAPOL" msprop:Generator_ColumnPropNameInRow="N_RAB_ZAPOL" msprop:Generator_ColumnVarNameInTable="columnN_RAB_ZAPOL" msprop:Generator_ColumnPropNameInTable="N_RAB_ZAPOLColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N_PRIZN" msprop:Generator_UserColumnName="N_PRIZN" msprop:Generator_ColumnPropNameInRow="N_PRIZN" msprop:Generator_ColumnVarNameInTable="columnN_PRIZN" msprop:Generator_ColumnPropNameInTable="N_PRIZNColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N_RAB" msdata:ReadOnly="true" msprop:Generator_UserColumnName="N_RAB" msprop:Generator_ColumnPropNameInRow="N_RAB" msprop:Generator_ColumnVarNameInTable="columnN_RAB" msprop:Generator_ColumnPropNameInTable="N_RABColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4000" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="N_OBRASCH_T" msdata:ReadOnly="true" msprop:Generator_UserColumnName="N_OBRASCH_T" msprop:Generator_ColumnVarNameInTable="columnN_OBRASCH_T" msprop:Generator_ColumnPropNameInRow="N_OBRASCH_T" msprop:Generator_ColumnPropNameInTable="N_OBRASCH_TColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="4" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="dtYear" msprop:Generator_UserTableName="dtYear" msprop:Generator_RowDeletedName="dtYearRowDeleted" msprop:Generator_RowChangedName="dtYearRowChanged" msprop:Generator_RowClassName="dtYearRow" msprop:Generator_RowChangingName="dtYearRowChanging" msprop:Generator_RowEvArgName="dtYearRowChangeEvent" msprop:Generator_RowEvHandlerName="dtYearRowChangeEventHandler" msprop:Generator_TableClassName="dtYearDataTable" msprop:Generator_TableVarName="tabledtYear" msprop:Generator_RowDeletingName="dtYearRowDeleting" msprop:Generator_TablePropName="dtYear">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="C_YEAR" msdata:ReadOnly="true" msprop:Generator_UserColumnName="C_YEAR" msprop:Generator_ColumnPropNameInRow="C_YEAR" msprop:Generator_ColumnVarNameInTable="columnC_YEAR" msprop:Generator_ColumnPropNameInTable="C_YEARColumn" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dtZhurnalObrasch" />
      <xs:field xpath="mstns:K_ZHURNAL_OBRASCH" />
    </xs:unique>
  </xs:element>
</xs:schema>